﻿using habbo.Kernel.Packets.Interfaces;
using habbo.Kernel.Packets.Messages;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace habbo.Kernel.Packets.com.sulake.habbo.communication.messages.incoming
{
    class PublicRoomsMessageEvent : IMessageEvent
    {
        /*
         * @Problems: None
         * @Additional fixes: MySQL..
         * */
        public void Invoke(Network.Session Session, Messages.ClientPacket Packet)
        {
            int Count = 1;
            ServerPacket prmc = new ServerPacket(Headers.MessageComposerIds.PublicRoomsMessageComposer);
            prmc.Append(Count);
            if (Count > 0)
            {
                Serialize(prmc);
            }

            prmc.Append(0);
            prmc.Append(0);
            Session.Send(prmc);
        }

        public void Serialize(ServerPacket Packet)
        {
            Packet.Append(1); // id
            Packet.Append("Theater"); //Caption
            Packet.Append(".. as in the old days!");
            Packet.Append(1); //BannerType
            Packet.Append(string.Empty); //haha, now you're empty
            Packet.Append("officalrooms_hq/theater.png"); //HMM?!
            Packet.Append(0);
            Packet.Append(0);
            Packet.Append(1);
            Packet.Append("theater");
        }
    }
}
